package quanlysach;


import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Documents
 */
public class Book 
{
    Scanner book = new Scanner(System.in);
    String maSach, tenSach;
    int namXB;
    
    //ham thiet lap
    public Book()
    {}
    
    public String getMaSach()
    {
        return maSach;
    }
    public void setMaSach(String maSach)
    {
        this.maSach = maSach;
    }
    
    public String getTenSach()
    {
        return tenSach;
    }
    public void setBook(String tenSach)
    {
        this.tenSach = tenSach;
    }
    
    public int getNamXB()
    {
        return namXB;
    }
    public void setBook(int namXB)
    {
        this.namXB = namXB;
    }
   
    public void setBook(String maSach, String tenSach, int namXB)
    {
        this.maSach = maSach;
        this.tenSach = tenSach;
        this.namXB = namXB;
    }
    
    public void addBook()
    {
        System.out.print("Nhap ma sach: ");
        maSach = book.nextLine();
        System.out.print("Nhap ten sach: ");
        tenSach = book.nextLine();
        System.out.print("Nhap nam xuat ban: ");
        namXB = book.nextInt();
    }
    
    public void printBook()
    {
        System.out.print("--Ma sach: " + maSach);
        System.out.print("--Ten sach: " + tenSach);
        System.out.print("--Nam xuat ban" + namXB);
    }
}
